/**
*	@class OpenGLExtensions
*
*	@brief A class for mapping the OpenGL extensions
*
*	@author William McVicar
*/

#pragma once

#ifndef __OPENGLEXTENSIONS_H_INCLUDED__
#define __OPENGLEXTENSIONS_H_INCLUDED__

//  Library Includes

//  Local Includes
#include <gl/GL.h>

//  Macros

//  Forward Declarations

//  Types

//  Constants

//  Prototypes

class OpenGLExtensions
{
	//Member Functions
public:

	static void MapExtensions();

protected: 

private: 

	//Member Variables
public:

	// OpenGL 1.4 is assumed for these mappings, so all extensions that are in the
    // core in OpenGL 1.4 don't have suffixes on their tokens and functions

    // Added in OpenGL 1.2
    #define GL_TEXTURE_BASE_LEVEL                           0x813C
    #define GL_TEXTURE_MAX_LEVEL                            0x813D
    #define GL_UNSIGNED_SHORT_4_4_4_4                       0x8033
    #define GL_UNSIGNED_SHORT_5_5_5_1                       0x8034
    #define GL_UNSIGNED_SHORT_5_6_5                         0x8363
    #define GL_UNSIGNED_SHORT_5_6_5_REV                     0x8364
    #define GL_UNSIGNED_SHORT_4_4_4_4_REV                   0x8365
    #define GL_UNSIGNED_SHORT_1_5_5_5_REV                   0x8366

    // GL_ARB_color_buffer_float
    #define GL_RGBA_FLOAT_MODE_ARB                          0x8820
    #define GL_CLAMP_VERTEX_COLOR_ARB                       0x891A
    #define GL_CLAMP_FRAGMENT_COLOR_ARB                     0x891B
    #define GL_CLAMP_READ_COLOR_ARB                         0x891C
    #define GL_FIXED_ONLY_ARB                               0x891D
    #define WGL_TYPE_RGBA_FLOAT_ARB                         0x21A0
    #define GLX_RGBA_FLOAT_TYPE_ARB                         0x20B9
    typedef void (APIENTRY * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
    static PFNGLCLAMPCOLORARBPROC                           glClampColorARB;

    // GL_ARB_depth_texture, promoted to core in OpenGL 1.4
    #define GL_DEPTH_COMPONENT16_ARB                        0x81A5
    #define GL_DEPTH_COMPONENT24_ARB                        0x81A6
    #define GL_DEPTH_COMPONENT32_ARB                        0x81A7
    #define GL_TEXTURE_DEPTH_SIZE_ARB                       0x884A
    #define GL_DEPTH_TEXTURE_MODE_ARB                       0x884B

    // GL_ARB_draw_buffers
    #define GL_MAX_DRAW_BUFFERS_ARB                         0x8824
    #define GL_DRAW_BUFFER0_ARB                             0x8825
    #define GL_DRAW_BUFFER1_ARB                             0x8826
    #define GL_DRAW_BUFFER2_ARB                             0x8827
    #define GL_DRAW_BUFFER3_ARB                             0x8828
    #define GL_DRAW_BUFFER4_ARB                             0x8829
    #define GL_DRAW_BUFFER5_ARB                             0x882A
    #define GL_DRAW_BUFFER6_ARB                             0x882B
    #define GL_DRAW_BUFFER7_ARB                             0x882C
    #define GL_DRAW_BUFFER8_ARB                             0x882D
    #define GL_DRAW_BUFFER9_ARB                             0x882E
    #define GL_DRAW_BUFFER10_ARB                            0x882F
    #define GL_DRAW_BUFFER11_ARB                            0x8830
    #define GL_DRAW_BUFFER12_ARB                            0x8831
    #define GL_DRAW_BUFFER13_ARB                            0x8832
    #define GL_DRAW_BUFFER14_ARB                            0x8833
    #define GL_DRAW_BUFFER15_ARB                            0x8834
    typedef void (APIENTRY * PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum * bufs);
    static PFNGLDRAWBUFFERSARBPROC                          glDrawBuffersARB;

    // GL_ARB_fragment_program
    #define GL_FRAGMENT_PROGRAM_ARB                         0x8804
    #define GL_PROGRAM_FORMAT_ASCII_ARB                     0x8875
    #define GL_PROGRAM_LENGTH_ARB                           0x8627
    #define GL_PROGRAM_FORMAT_ARB                           0x8876
    #define GL_PROGRAM_BINDING_ARB                          0x8677
    #define GL_PROGRAM_INSTRUCTIONS_ARB                     0x88A0
    #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB                 0x88A1
    #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB              0x88A2
    #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB          0x88A3
    #define GL_PROGRAM_TEMPORARIES_ARB                      0x88A4
    #define GL_MAX_PROGRAM_TEMPORARIES_ARB                  0x88A5
    #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB               0x88A6
    #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB           0x88A7
    #define GL_PROGRAM_PARAMETERS_ARB                       0x88A8
    #define GL_MAX_PROGRAM_PARAMETERS_ARB                   0x88A9
    #define GL_PROGRAM_NATIVE_PARAMETERS_ARB                0x88AA
    #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB            0x88AB
    #define GL_PROGRAM_ATTRIBS_ARB                          0x88AC
    #define GL_MAX_PROGRAM_ATTRIBS_ARB                      0x88AD
    #define GL_PROGRAM_NATIVE_ATTRIBS_ARB                   0x88AE
    #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB               0x88AF
    #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB             0x88B4
    #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB               0x88B5
    #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB              0x88B6
    #define GL_PROGRAM_ALU_INSTRUCTIONS_ARB                 0x8805
    #define GL_PROGRAM_TEX_INSTRUCTIONS_ARB                 0x8806
    #define GL_PROGRAM_TEX_INDIRECTIONS_ARB                 0x8807
    #define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB          0x8808
    #define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB          0x8809
    #define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB          0x880A
    #define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB             0x880B
    #define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB             0x880C
    #define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB             0x880D
    #define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB      0x880E
    #define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB      0x880F
    #define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB      0x8810
    #define GL_PROGRAM_STRING_ARB                           0x8628
    #define GL_PROGRAM_ERROR_POSITION_ARB                   0x864B
    #define GL_CURRENT_MATRIX_ARB                           0x8641
    #define GL_TRANSPOSE_CURRENT_MATRIX_ARB                 0x88B7
    #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB               0x8640
    #define GL_MAX_PROGRAM_MATRICES_ARB                     0x862F
    #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB           0x862E
    #define GL_MAX_TEXTURE_COORDS_ARB                       0x8871
    #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB                  0x8872
    #define GL_PROGRAM_ERROR_STRING_ARB                     0x8874
    #define GL_MATRIX0_ARB                                  0x88C0
    #define GL_MATRIX1_ARB                                  0x88C1
    #define GL_MATRIX2_ARB                                  0x88C2
    #define GL_MATRIX3_ARB                                  0x88C3
    #define GL_MATRIX4_ARB                                  0x88C4
    #define GL_MATRIX5_ARB                                  0x88C5
    #define GL_MATRIX6_ARB                                  0x88C6
    #define GL_MATRIX7_ARB                                  0x88C7
    #define GL_MATRIX8_ARB                                  0x88C8
    #define GL_MATRIX9_ARB                                  0x88C9
    #define GL_MATRIX10_ARB                                 0x88CA
    #define GL_MATRIX11_ARB                                 0x88CB
    #define GL_MATRIX12_ARB                                 0x88CC
    #define GL_MATRIX13_ARB                                 0x88CD
    #define GL_MATRIX14_ARB                                 0x88CE
    #define GL_MATRIX15_ARB                                 0x88CF
    #define GL_MATRIX16_ARB                                 0x88D0
    #define GL_MATRIX17_ARB                                 0x88D1
    #define GL_MATRIX18_ARB                                 0x88D2
    #define GL_MATRIX19_ARB                                 0x88D3
    #define GL_MATRIX20_ARB                                 0x88D4
    #define GL_MATRIX21_ARB                                 0x88D5
    #define GL_MATRIX22_ARB                                 0x88D6
    #define GL_MATRIX23_ARB                                 0x88D7
    #define GL_MATRIX24_ARB                                 0x88D8
    #define GL_MATRIX25_ARB                                 0x88D9
    #define GL_MATRIX26_ARB                                 0x88DA
    #define GL_MATRIX27_ARB                                 0x88DB
    #define GL_MATRIX28_ARB                                 0x88DC
    #define GL_MATRIX29_ARB                                 0x88DD
    #define GL_MATRIX30_ARB                                 0x88DE
    #define GL_MATRIX31_ARB                                 0x88DF
    typedef GLvoid (APIENTRY * PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid * string);
    typedef GLvoid (APIENTRY * PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program);
    typedef GLvoid (APIENTRY * PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint * programs);
    typedef GLvoid (APIENTRY * PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint * programs);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble * params);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat * params);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble * params);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat * params);
    typedef GLvoid (APIENTRY * PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble * params);
    typedef GLvoid (APIENTRY * PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat * params);
    typedef GLvoid (APIENTRY * PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble * params);
    typedef GLvoid (APIENTRY * PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat * params);
    typedef GLvoid (APIENTRY * PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
    typedef GLvoid (APIENTRY * PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
    typedef GLboolean (APIENTRY * PFNGLISPROGRAMARBPROC) (GLuint program);
    static PFNGLPROGRAMSTRINGARBPROC                        glProgramStringARB;
    static PFNGLBINDPROGRAMARBPROC                          glBindProgramARB;
    static PFNGLDELETEPROGRAMSARBPROC                       glDeleteProgramsARB;
    static PFNGLGENPROGRAMSARBPROC                          glGenProgramsARB;
    static PFNGLPROGRAMENVPARAMETER4DARBPROC                glProgramEnvParameter4dARB;
    static PFNGLPROGRAMENVPARAMETER4DVARBPROC               glProgramEnvParameter4dvARB;
    static PFNGLPROGRAMENVPARAMETER4FARBPROC                glProgramEnvParameter4fARB;
    static PFNGLPROGRAMENVPARAMETER4FVARBPROC               glProgramEnvParameter4fvARB;
    static PFNGLPROGRAMLOCALPARAMETER4DARBPROC              glProgramLocalParameter4dARB;
    static PFNGLPROGRAMLOCALPARAMETER4DVARBPROC             glProgramLocalParameter4dvARB;
    static PFNGLPROGRAMLOCALPARAMETER4FARBPROC              glProgramLocalParameter4fARB;
    static PFNGLPROGRAMLOCALPARAMETER4FVARBPROC             glProgramLocalParameter4fvARB;
    static PFNGLGETPROGRAMENVPARAMETERDVARBPROC             glGetProgramEnvParameterdvARB;
    static PFNGLGETPROGRAMENVPARAMETERFVARBPROC             glGetProgramEnvParameterfvARB;
    static PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC           glGetProgramLocalParameterdvARB;
    static PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC           glGetProgramLocalParameterfvARB;
    static PFNGLGETPROGRAMIVARBPROC                         glGetProgramivARB;
    static PFNGLGETPROGRAMSTRINGARBPROC                     glGetProgramStringARB;
    static PFNGLISPROGRAMARBPROC                            glIsProgramARB;

    // GL_ARB_fragment_shader
    #define GL_FRAGMENT_SHADER_ARB                          0x8B30
    #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB          0x8B49
    #define GL_MAX_TEXTURE_COORDS_ARB                       0x8871
    #define GL_MAX_TEXTURE_IMAGE_UNITS_ARB                  0x8872
    #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB          0x8B8B

    // GL_ARB_half_float_pixel
    #define GL_HALF_FLOAT_ARB                               0x140B

    // GL_ARB_multisample promoted to core in OpenGL 1.3
    #define GL_MULTISAMPLE                                  0x809D
    #define GL_SAMPLE_ALPHA_TO_COVERAGE                     0x809E
    #define GL_SAMPLE_ALPHA_TO_ONE                          0x809F
    #define GL_SAMPLE_COVERAGE                              0x80A0
    #define GL_MULTISAMPLE_BIT                              0x20000000
    #define GL_SAMPLE_BUFFERS                               0x80A8
    #define GL_SAMPLES                                      0x80A9
    #define GL_SAMPLE_COVERAGE_VALUE                        0x80AA
    #define GL_SAMPLE_COVERAGE_INVERT                       0x80AB
    typedef void (APIENTRY * PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert);
    static PFNGLSAMPLECOVERAGEPROC                          glSampleCoverage;

    // GL_ARB_multitexture, promoted to core in OpenGL 1.3
    // Immediate mode multitexture functions are not defined
    #define GL_TEXTURE0                                     0x84C0
    #define GL_TEXTURE1                                     0x84C1
    #define GL_TEXTURE2                                     0x84C2
    #define GL_TEXTURE3                                     0x84C3
    #define GL_TEXTURE4                                     0x84C4
    #define GL_TEXTURE5                                     0x84C5
    #define GL_TEXTURE6                                     0x84C6
    #define GL_TEXTURE7                                     0x84C7
    #define GL_TEXTURE8                                     0x84C8
    #define GL_TEXTURE9                                     0x84C9
    #define GL_TEXTURE10                                    0x84CA
    #define GL_TEXTURE11                                    0x84CB
    #define GL_TEXTURE12                                    0x84CC
    #define GL_TEXTURE13                                    0x84CD
    #define GL_TEXTURE14                                    0x84CE
    #define GL_TEXTURE15                                    0x84CF
    #define GL_TEXTURE16                                    0x84D0
    #define GL_TEXTURE17                                    0x84D1
    #define GL_TEXTURE18                                    0x84D2
    #define GL_TEXTURE19                                    0x84D3
    #define GL_TEXTURE20                                    0x84D4
    #define GL_TEXTURE21                                    0x84D5
    #define GL_TEXTURE22                                    0x84D6
    #define GL_TEXTURE23                                    0x84D7
    #define GL_TEXTURE24                                    0x84D8
    #define GL_TEXTURE25                                    0x84D9
    #define GL_TEXTURE26                                    0x84DA
    #define GL_TEXTURE27                                    0x84DB
    #define GL_TEXTURE28                                    0x84DC
    #define GL_TEXTURE29                                    0x84DD
    #define GL_TEXTURE30                                    0x84DE
    #define GL_TEXTURE31                                    0x84DF
    #define GL_ACTIVE_TEXTURE                               0x84E0
    #define GL_CLIENT_ACTIVE_TEXTURE                        0x84E1
    #define GL_MAX_TEXTURE_UNITS                            0x84E2
    typedef void (APIENTRY * PFNGLACTIVETEXTUREPROC) (GLenum texture);
    typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture);
    static PFNGLACTIVETEXTUREPROC                           glActiveTexture;
    static PFNGLCLIENTACTIVETEXTUREPROC                     glClientActiveTexture;

    // GL_ARB_shader_objects
    #define GL_PROGRAM_OBJECT_ARB                           0x8B40
    #define GL_OBJECT_TYPE_ARB                              0x8B4E
    #define GL_OBJECT_SUBTYPE_ARB                           0x8B4F
    #define GL_OBJECT_DELETE_STATUS_ARB                     0x8B80
    #define GL_OBJECT_COMPILE_STATUS_ARB                    0x8B81
    #define GL_OBJECT_LINK_STATUS_ARB                       0x8B82
    #define GL_OBJECT_VALIDATE_STATUS_ARB                   0x8B83
    #define GL_OBJECT_INFO_LOG_LENGTH_ARB                   0x8B84
    #define GL_OBJECT_ATTACHED_OBJECTS_ARB                  0x8B85
    #define GL_OBJECT_ACTIVE_UNIFORMS_ARB                   0x8B86
    #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB         0x8B87
    #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB              0x8B88
    #define GL_SHADER_OBJECT_ARB                            0x8B48
    #define GL_FLOAT_VEC2_ARB                               0x8B50
    #define GL_FLOAT_VEC3_ARB                               0x8B51
    #define GL_FLOAT_VEC4_ARB                               0x8B52
    #define GL_INT_VEC2_ARB                                 0x8B53
    #define GL_INT_VEC3_ARB                                 0x8B54
    #define GL_INT_VEC4_ARB                                 0x8B55
    #define GL_BOOL_ARB                                     0x8B56
    #define GL_BOOL_VEC2_ARB                                0x8B57
    #define GL_BOOL_VEC3_ARB                                0x8B58
    #define GL_BOOL_VEC4_ARB                                0x8B59
    #define GL_FLOAT_MAT2_ARB                               0x8B5A
    #define GL_FLOAT_MAT3_ARB                               0x8B5B
    #define GL_FLOAT_MAT4_ARB                               0x8B5C
    #define GL_SAMPLER_1D_ARB                               0x8B5D
    #define GL_SAMPLER_2D_ARB                               0x8B5E
    #define GL_SAMPLER_3D_ARB                               0x8B5F
    #define GL_SAMPLER_CUBE_ARB                             0x8B60
    #define GL_SAMPLER_1D_SHADOW_ARB                        0x8B61
    #define GL_SAMPLER_2D_SHADOW_ARB                        0x8B62
    #define GL_SAMPLER_2D_RECT_ARB                          0x8B63
    #define GL_SAMPLER_2D_RECT_SHADOW_ARB                   0x8B64
    typedef char         GLcharARB;
    typedef unsigned int GLhandleARB;
    typedef void (APIENTRY * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
    typedef GLhandleARB (APIENTRY * PFNGLGETHANDLEARBPROC) (GLenum pname);
    typedef void (APIENTRY * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
    typedef GLhandleARB (APIENTRY * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
    typedef void (APIENTRY * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length);
    typedef void (APIENTRY * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
    typedef GLhandleARB (APIENTRY * PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
    typedef void (APIENTRY * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
    typedef void (APIENTRY * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
    typedef void (APIENTRY * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
    typedef void (APIENTRY * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
    typedef void (APIENTRY * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
    typedef void (APIENTRY * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
    typedef void (APIENTRY * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
    typedef void (APIENTRY * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
    typedef void (APIENTRY * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
    typedef void (APIENTRY * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
    typedef void (APIENTRY * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
    typedef void (APIENTRY * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
    typedef void (APIENTRY * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
    typedef void (APIENTRY * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
    typedef void (APIENTRY * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
    typedef void (APIENTRY * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat *value);
    typedef void (APIENTRY * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint *value);
    typedef void (APIENTRY * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint *value);
    typedef void (APIENTRY * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint *value);
    typedef void (APIENTRY * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint *value);
    typedef void (APIENTRY * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    typedef void (APIENTRY * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    typedef void (APIENTRY * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
    typedef void (APIENTRY * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat *params);
    typedef void (APIENTRY * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint *params);
    typedef void (APIENTRY * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog);
    typedef void (APIENTRY * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj);
    typedef GLint (APIENTRY * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
    typedef void (APIENTRY * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
    typedef void (APIENTRY * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat *params);
    typedef void (APIENTRY * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint *params);
    typedef void (APIENTRY * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source);
    static PFNGLDELETEOBJECTARBPROC                         glDeleteObjectARB;
    static PFNGLGETHANDLEARBPROC                            glGetHandleARB;
    static PFNGLDETACHOBJECTARBPROC                         glDetachObjectARB;
    static PFNGLCREATESHADEROBJECTARBPROC                   glCreateShaderObjectARB;
    static PFNGLSHADERSOURCEARBPROC                         glShaderSourceARB;
    static PFNGLCOMPILESHADERARBPROC                        glCompileShaderARB;
    static PFNGLCREATEPROGRAMOBJECTARBPROC                  glCreateProgramObjectARB;
    static PFNGLATTACHOBJECTARBPROC                         glAttachObjectARB;
    static PFNGLLINKPROGRAMARBPROC                          glLinkProgramARB;
    static PFNGLUSEPROGRAMOBJECTARBPROC                     glUseProgramObjectARB;
    static PFNGLVALIDATEPROGRAMARBPROC                      glValidateProgramARB;
    static PFNGLUNIFORM1FARBPROC                            glUniform1fARB;
    static PFNGLUNIFORM2FARBPROC                            glUniform2fARB;
    static PFNGLUNIFORM3FARBPROC                            glUniform3fARB;
    static PFNGLUNIFORM4FARBPROC                            glUniform4fARB;
    static PFNGLUNIFORM1IARBPROC                            glUniform1iARB;
    static PFNGLUNIFORM2IARBPROC                            glUniform2iARB;
    static PFNGLUNIFORM3IARBPROC                            glUniform3iARB;
    static PFNGLUNIFORM4IARBPROC                            glUniform4iARB;
    static PFNGLUNIFORM1FVARBPROC                           glUniform1fvARB;
    static PFNGLUNIFORM2FVARBPROC                           glUniform2fvARB;
    static PFNGLUNIFORM3FVARBPROC                           glUniform3fvARB;
    static PFNGLUNIFORM4FVARBPROC                           glUniform4fvARB;
    static PFNGLUNIFORM1IVARBPROC                           glUniform1ivARB;
    static PFNGLUNIFORM2IVARBPROC                           glUniform2ivARB;
    static PFNGLUNIFORM3IVARBPROC                           glUniform3ivARB;
    static PFNGLUNIFORM4IVARBPROC                           glUniform4ivARB;
    static PFNGLUNIFORMMATRIX2FVARBPROC                     glUniformMatrix2fvARB;
    static PFNGLUNIFORMMATRIX3FVARBPROC                     glUniformMatrix3fvARB;
    static PFNGLUNIFORMMATRIX4FVARBPROC                     glUniformMatrix4fvARB;
    static PFNGLGETOBJECTPARAMETERFVARBPROC                 glGetObjectParameterfvARB;
    static PFNGLGETOBJECTPARAMETERIVARBPROC                 glGetObjectParameterivARB;
    static PFNGLGETINFOLOGARBPROC                           glGetInfoLogARB;
    static PFNGLGETATTACHEDOBJECTSARBPROC                   glGetAttachedObjectsARB;
    static PFNGLGETUNIFORMLOCATIONARBPROC                   glGetUniformLocationARB;
    static PFNGLGETACTIVEUNIFORMARBPROC                     glGetActiveUniformARB;
    static PFNGLGETUNIFORMFVARBPROC                         glGetUniformfvARB;
    static PFNGLGETUNIFORMIVARBPROC                         glGetUniformivARB;
    static PFNGLGETSHADERSOURCEARBPROC                      glGetShaderSourceARB;

    // GL_ARB_shading_language_100
    #define GL_SHADING_LANGUAGE_VERSION_ARB                 0x8B8C

    // GL_ARB_shadow, promoted to core in OpenGL 1.4
    #define GL_TEXTURE_COMPARE_MODE                         0x884C
    #define GL_TEXTURE_COMPARE_FUNC                         0x884D
    #define GL_COMPARE_R_TO_TEXTURE                         0x884E

    // GL_ARB_texture_compression, promoted to core in OpenGL 1.3
    #define GL_COMPRESSED_ALPHA                             0x84E9
    #define GL_COMPRESSED_LUMINANCE                         0x84EA
    #define GL_COMPRESSED_LUMINANCE_ALPHA                   0x84EB
    #define GL_COMPRESSED_INTENSITY                         0x84EC
    #define GL_COMPRESSED_RGB                               0x84ED
    #define GL_COMPRESSED_RGBA                              0x84EE
    #define GL_TEXTURE_COMPRESSION_HINT                     0x84EF
    #define GL_TEXTURE_COMPRESSED_IMAGE_SIZE                0x86A0
    #define GL_TEXTURE_COMPRESSED                           0x86A1
    #define GL_NUM_COMPRESSED_TEXTURE_FORMATS               0x86A2
    #define GL_COMPRESSED_TEXTURE_FORMATS                   0x86A3
    typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
    typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
    typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
    typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
    typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
    typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
    typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
    static PFNGLCOMPRESSEDTEXIMAGE1DPROC                    glCompressedTexImage1D;
    static PFNGLCOMPRESSEDTEXIMAGE2DPROC                    glCompressedTexImage2D;
    static PFNGLCOMPRESSEDTEXIMAGE3DPROC                    glCompressedTexImage3D;
    static PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC                 glCompressedTexSubImage1D;
    static PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC                 glCompressedTexSubImage2D;
    static PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC                 glCompressedTexSubImage3D;
    static PFNGLGETCOMPRESSEDTEXIMAGEPROC                   glGetCompressedTexImage;

    // GL_ARB_texture_cube_map, promoted to core in OpenGL 1.3
    #define GL_NORMAL_MAP                                   0x8511
    #define GL_REFLECTION_MAP                               0x8512
    #define GL_TEXTURE_CUBE_MAP                             0x8513
    #define GL_TEXTURE_BINDING_CUBE_MAP                     0x8514
    #define GL_TEXTURE_CUBE_MAP_POSITIVE_X                  0x8515
    #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X                  0x8516
    #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y                  0x8517
    #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y                  0x8518
    #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z                  0x8519
    #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z                  0x851A
    #define GL_PROXY_TEXTURE_CUBE_MAP                       0x851B
    #define GL_MAX_CUBE_MAP_TEXTURE_SIZE                    0x851C

    // GL_ARB_texture_env_combine, promoted to core in OpenGL 1.3
    #define GL_COMBINE                                      0x8570
    #define GL_COMBINE_RGB                                  0x8571
    #define GL_COMBINE_ALPHA                                0x8572
    #define GL_SOURCE0_RGB                                  0x8580
    #define GL_SOURCE1_RGB                                  0x8581
    #define GL_SOURCE2_RGB                                  0x8582
    #define GL_SOURCE0_ALPHA                                0x8588
    #define GL_SOURCE1_ALPHA                                0x8589
    #define GL_SOURCE2_ALPHA                                0x858A
    #define GL_OPERAND0_RGB                                 0x8590
    #define GL_OPERAND1_RGB                                 0x8591
    #define GL_OPERAND2_RGB                                 0x8592
    #define GL_OPERAND0_ALPHA                               0x8598
    #define GL_OPERAND1_ALPHA                               0x8599
    #define GL_OPERAND2_ALPHA                               0x859A
    #define GL_RGB_SCALE                                    0x8573
    #define GL_ADD_SIGNED                                   0x8574
    #define GL_INTERPOLATE                                  0x8575
    #define GL_SUBTRACT                                     0x84E7
    #define GL_CONSTANT                                     0x8576
    #define GL_PRIMARY_COLOR                                0x8577
    #define GL_PREVIOUS                                     0x8578

    // GL_ARB_texture_float
    #define GL_TEXTURE_RED_TYPE_ARB                         0x8C10
    #define GL_TEXTURE_GREEN_TYPE_ARB                       0x8C11
    #define GL_TEXTURE_BLUE_TYPE_ARB                        0x8C12
    #define GL_TEXTURE_ALPHA_TYPE_ARB                       0x8C13
    #define GL_TEXTURE_LUMINANCE_TYPE_ARB                   0x8C14
    #define GL_TEXTURE_INTENSITY_TYPE_ARB                   0x8C15
    #define GL_TEXTURE_DEPTH_TYPE_ARB                       0x8C16
    #define GL_UNSIGNED_NORMALIZED_ARB                      0x8C17
    #define GL_RGBA32F_ARB                                  0x8814
    #define GL_RGB32F_ARB                                   0x8815
    #define GL_ALPHA32F_ARB                                 0x8816
    #define GL_INTENSITY32F_ARB                             0x8817
    #define GL_LUMINANCE32F_ARB                             0x8818
    #define GL_LUMINANCE_ALPHA32F_ARB                       0x8819
    #define GL_RGBA16F_ARB                                  0x881A
    #define GL_RGB16F_ARB                                   0x881B
    #define GL_ALPHA16F_ARB                                 0x881C
    #define GL_INTENSITY16F_ARB                             0x881D
    #define GL_LUMINANCE16F_ARB                             0x881E
    #define GL_LUMINANCE_ALPHA16F_ARB                       0x881F

    // GL_ARB_vertex_buffer_object, promoted to core in OpenGL 1.5
    #define GL_ARRAY_BUFFER_ARB                             0x8892
    #define GL_ELEMENT_ARRAY_BUFFER_ARB                     0x8893
    #define GL_ARRAY_BUFFER_BINDING_ARB                     0x8894
    #define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB             0x8895
    #define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB              0x8896
    #define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB              0x8897
    #define GL_COLOR_ARRAY_BUFFER_BINDING_ARB               0x8898
    #define GL_INDEX_ARRAY_BUFFER_BINDING_ARB               0x8899
    #define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB       0x889A
    #define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB           0x889B
    #define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB     0x889C
    #define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB      0x889D
    #define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB              0x889E
    #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB       0x889F
    #define GL_STREAM_DRAW_ARB                              0x88E0
    #define GL_STREAM_READ_ARB                              0x88E1
    #define GL_STREAM_COPY_ARB                              0x88E2
    #define GL_STATIC_DRAW_ARB                              0x88E4
    #define GL_STATIC_READ_ARB                              0x88E5
    #define GL_STATIC_COPY_ARB                              0x88E6
    #define GL_DYNAMIC_DRAW_ARB                             0x88E8
    #define GL_DYNAMIC_READ_ARB                             0x88E9
    #define GL_DYNAMIC_COPY_ARB                             0x88EA
    #define GL_READ_ONLY_ARB                                0x88B8
    #define GL_WRITE_ONLY_ARB                               0x88B9
    #define GL_READ_WRITE_ARB                               0x88BA
    #define GL_BUFFER_SIZE_ARB                              0x8764
    #define GL_BUFFER_USAGE_ARB                             0x8765
    #define GL_BUFFER_ACCESS_ARB                            0x88BB
    #define GL_BUFFER_MAPPED_ARB                            0x88BC
    #define GL_BUFFER_MAP_POINTER_ARB                       0x88BD
    typedef ptrdiff_t GLintptrARB;
    typedef ptrdiff_t GLsizeiptrARB;
    typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
    typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint *buffers);
    typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint *buffers);
    typedef GLboolean (APIENTRY * PFNGLISBUFFERARBPROC) (GLuint buffer);
    typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage);
    typedef void (APIENTRY * PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data);
    typedef void (APIENTRY * PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data);
    typedef GLvoid* (APIENTRY * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
    typedef GLboolean (APIENTRY * PFNGLUNMAPBUFFERARBPROC) (GLenum target);
    typedef void (APIENTRY * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
    typedef void (APIENTRY * PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* *params);
    static PFNGLBINDBUFFERARBPROC                           glBindBufferARB;
    static PFNGLDELETEBUFFERSARBPROC                        glDeleteBuffersARB;
    static PFNGLGENBUFFERSARBPROC                           glGenBuffersARB;
    static PFNGLISBUFFERARBPROC                             glIsBufferARB;
    static PFNGLBUFFERDATAARBPROC                           glBufferDataARB;
    static PFNGLBUFFERSUBDATAARBPROC                        glBufferSubDataARB;
    static PFNGLGETBUFFERSUBDATAARBPROC                     glGetBufferSubDataARB;
    static PFNGLMAPBUFFERARBPROC                            glMapBufferARB;
    static PFNGLUNMAPBUFFERARBPROC                          glUnmapBufferARB;
    static PFNGLGETBUFFERPARAMETERIVARBPROC                 glGetBufferParameterivARB;
    static PFNGLGETBUFFERPOINTERVARBPROC                    glGetBufferPointervARB;
	#define BUFFER_OFFSET(i) (reinterpret_cast<byte *>(NULL) + (i))

    // GL_ARB_vertex_program
    #define GL_VERTEX_PROGRAM_ARB                           0x8620
    #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB                0x8642
    #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB                  0x8643
    #define GL_COLOR_SUM_ARB                                0x8458
    #define GL_PROGRAM_FORMAT_ASCII_ARB                     0x8875
    #define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB              0x8622
    #define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB                 0x8623
    #define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB               0x8624
    #define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB                 0x8625
    #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB           0x886A
    #define GL_CURRENT_VERTEX_ATTRIB_ARB                    0x8626
    #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB              0x8645
    #define GL_PROGRAM_LENGTH_ARB                           0x8627
    #define GL_PROGRAM_FORMAT_ARB                           0x8876
    #define GL_PROGRAM_BINDING_ARB                          0x8677
    #define GL_PROGRAM_INSTRUCTIONS_ARB                     0x88A0
    #define GL_MAX_PROGRAM_INSTRUCTIONS_ARB                 0x88A1
    #define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB              0x88A2
    #define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB          0x88A3
    #define GL_PROGRAM_TEMPORARIES_ARB                      0x88A4
    #define GL_MAX_PROGRAM_TEMPORARIES_ARB                  0x88A5
    #define GL_PROGRAM_NATIVE_TEMPORARIES_ARB               0x88A6
    #define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB           0x88A7
    #define GL_PROGRAM_PARAMETERS_ARB                       0x88A8
    #define GL_MAX_PROGRAM_PARAMETERS_ARB                   0x88A9
    #define GL_PROGRAM_NATIVE_PARAMETERS_ARB                0x88AA
    #define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB            0x88AB
    #define GL_PROGRAM_ATTRIBS_ARB                          0x88AC
    #define GL_MAX_PROGRAM_ATTRIBS_ARB                      0x88AD
    #define GL_PROGRAM_NATIVE_ATTRIBS_ARB                   0x88AE
    #define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB               0x88AF
    #define GL_PROGRAM_ADDRESS_REGISTERS_ARB                0x88B0
    #define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB            0x88B1
    #define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB         0x88B2
    #define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB     0x88B3
    #define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB             0x88B4
    #define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB               0x88B5
    #define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB              0x88B6
    #define GL_PROGRAM_STRING_ARB                           0x8628
    #define GL_PROGRAM_ERROR_POSITION_ARB                   0x864B
    #define GL_CURRENT_MATRIX_ARB                           0x8641
    #define GL_TRANSPOSE_CURRENT_MATRIX_ARB                 0x88B7
    #define GL_CURRENT_MATRIX_STACK_DEPTH_ARB               0x8640
    #define GL_MAX_VERTEX_ATTRIBS_ARB                       0x8869
    #define GL_MAX_PROGRAM_MATRICES_ARB                     0x862F
    #define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB           0x862E
    typedef void (APIENTRY * PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer);
    typedef void (APIENTRY * PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
    typedef void (APIENTRY * PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
    typedef void (APIENTRY * PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
    typedef void (APIENTRY * PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
    typedef void (APIENTRY * PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
    typedef void (APIENTRY * PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid **pointer);
    static PFNGLVERTEXATTRIBPOINTERARBPROC                  glVertexAttribPointerARB;
    static PFNGLENABLEVERTEXATTRIBARRAYARBPROC              glEnableVertexAttribArrayARB;
    static PFNGLDISABLEVERTEXATTRIBARRAYARBPROC             glDisableVertexAttribArrayARB;
    static PFNGLGETVERTEXATTRIBDVARBPROC                    glGetVertexAttribdvARB;
    static PFNGLGETVERTEXATTRIBFVARBPROC                    glGetVertexAttribfvARB;
    static PFNGLGETVERTEXATTRIBIVARBPROC                    glGetVertexAttribivARB;
    static PFNGLGETVERTEXATTRIBPOINTERVARBPROC              glGetVertexAttribPointervARB;

    // GL_ARB_vertex_shader
    #define GL_VERTEX_SHADER_ARB                            0x8B31
    #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB            0x8B4A
    #define GL_MAX_VARYING_FLOATS_ARB                       0x8B4B
    #define GL_MAX_VERTEX_ATTRIBS_ARB                       0x8869
    #define GL_MAX_TEXTURE_IMAGE_UNITS                      0x8872
    #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB           0x8B4C
    #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB         0x8B4D
    #define GL_MAX_TEXTURE_COORDS_ARB                       0x8871
    #define GL_VERTEX_PROGRAM_POINT_SIZE_ARB                0x8642
    #define GL_VERTEX_PROGRAM_TWO_SIDE_ARB                  0x8643
    #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB                 0x8B89
    #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB       0x8B8A
    #define GL_CURRENT_VERTEX_ATTRIB_ARB                    0x8626
    #define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB              0x8645
    #define GL_FLOAT_VEC2_ARB                               0x8B50
    #define GL_FLOAT_VEC3_ARB                               0x8B51
    #define GL_FLOAT_VEC4_ARB                               0x8B52
    #define GL_FLOAT_MAT2_ARB                               0x8B5A
    #define GL_FLOAT_MAT3_ARB                               0x8B5B
    #define GL_FLOAT_MAT4_ARB                               0x8B5C
    typedef void (APIENTRY * PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB *name);
    typedef void (APIENTRY * PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name);
    typedef GLint (APIENTRY * PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB *name);
    static PFNGLBINDATTRIBLOCATIONARBPROC                   glBindAttribLocationARB;
    static PFNGLGETACTIVEATTRIBARBPROC                      glGetActiveAttribARB;
    static PFNGLGETATTRIBLOCATIONARBPROC                    glGetAttribLocationARB;

    // GL_ATI_text_fragment_shader
    #define GL_TEXT_FRAGMENT_SHADER_ATI                     0x8200

    // GL_EXT_abgr
    #define GL_ABGR_EXT                                     0x8000

    // GL_EXT_bgra, promoted to core in OpenGL 1.2
    #define GL_BGR                                          0x80E0
    #define GL_BGRA                                         0x80E1

    // GL_EXT_draw_range_elements, promoted to core in OpenGL 1.2
    #define GL_MAX_ELEMENTS_VERTICES                        0x80E8
    #define GL_MAX_ELEMENTS_INDICES                         0x80E9
    typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
    static PFNGLDRAWRANGEELEMENTSPROC                       glDrawRangeElements;

    // GL_EXT_framebuffer_object
    #define GL_FRAMEBUFFER_EXT                              0x8D40
    #define GL_RENDERBUFFER_EXT                             0x8D41
    #define GL_STENCIL_INDEX_EXT                            0x8D45
    #define GL_STENCIL_INDEX1_EXT                           0x8D46
    #define GL_STENCIL_INDEX4_EXT                           0x8D47
    #define GL_STENCIL_INDEX8_EXT                           0x8D48
    #define GL_STENCIL_INDEX16_EXT                          0x8D49
    #define GL_RENDERBUFFER_WIDTH_EXT                       0x8D42
    #define GL_RENDERBUFFER_HEIGHT_EXT                      0x8D43
    #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT             0x8D44
    #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT       0x8CD0
    #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT       0x8CD1
    #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT     0x8CD2
    #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
    #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT    0x8CD4
    #define GL_COLOR_ATTACHMENT0_EXT                        0x8CE0
    #define GL_COLOR_ATTACHMENT1_EXT                        0x8CE1
    #define GL_COLOR_ATTACHMENT2_EXT                        0x8CE2
    #define GL_COLOR_ATTACHMENT3_EXT                        0x8CE3
    #define GL_COLOR_ATTACHMENT4_EXT                        0x8CE4
    #define GL_COLOR_ATTACHMENT5_EXT                        0x8CE5
    #define GL_COLOR_ATTACHMENT6_EXT                        0x8CE6
    #define GL_COLOR_ATTACHMENT7_EXT                        0x8CE7
    #define GL_COLOR_ATTACHMENT8_EXT                        0x8CE8
    #define GL_COLOR_ATTACHMENT9_EXT                        0x8CE9
    #define GL_COLOR_ATTACHMENT10_EXT                       0x8CEA
    #define GL_COLOR_ATTACHMENT11_EXT                       0x8CEB
    #define GL_COLOR_ATTACHMENT12_EXT                       0x8CEC
    #define GL_COLOR_ATTACHMENT13_EXT                       0x8CED
    #define GL_COLOR_ATTACHMENT14_EXT                       0x8CEE
    #define GL_COLOR_ATTACHMENT15_EXT                       0x8CEF
    #define GL_DEPTH_ATTACHMENT_EXT                         0x8D00
    #define GL_STENCIL_ATTACHMENT_EXT                       0x8D20
    #define GL_FRAMEBUFFER_COMPLETE_EXT                     0x8CD5
    #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT        0x8CD6
    #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT    0x8CD7
    #define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT  0x8CD8
    #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT        0x8CD9
    #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT           0x8CDA
    #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT       0x8CDB
    #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT       0x8CDC
    #define GL_FRAMEBUFFER_UNSUPPORTED_EXT                  0x8CDD
    #define GL_FRAMEBUFFER_STATUS_ERROR_EXT                 0x8CDE
    #define GL_FRAMEBUFFER_BINDING_EXT                      0x8CA6
    #define GL_RENDERBUFFER_BINDING_EXT                     0x8CA7
    #define GL_MAX_COLOR_ATTACHMENTS_EXT                    0x8CDF
    #define GL_MAX_RENDERBUFFER_SIZE_EXT                    0x84E8
    #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT            0x0506
    typedef GLboolean (APIENTRY * PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
    typedef void (APIENTRY * PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
    typedef void (APIENTRY * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
    typedef void (APIENTRY * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
    typedef void (APIENTRY * PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
    typedef void (APIENTRY * PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint* params);
    typedef GLboolean (APIENTRY * PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
    typedef void (APIENTRY * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
    typedef void (APIENTRY * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
    typedef void (APIENTRY * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
    typedef GLenum (APIENTRY * PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
    typedef void (APIENTRY * PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
    typedef void (APIENTRY * PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
    static PFNGLISRENDERBUFFEREXTPROC                       glIsRenderbufferEXT;
    static PFNGLBINDRENDERBUFFEREXTPROC                     glBindRenderbufferEXT;
    static PFNGLDELETERENDERBUFFERSEXTPROC                  glDeleteRenderbuffersEXT;
    static PFNGLGENRENDERBUFFERSEXTPROC                     glGenRenderbuffersEXT;
    static PFNGLRENDERBUFFERSTORAGEEXTPROC                  glRenderbufferStorageEXT;
    static PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC           glGetRenderbufferParameterivEXT;
    static PFNGLISFRAMEBUFFEREXTPROC                        glIsFramebufferEXT;
    static PFNGLBINDFRAMEBUFFEREXTPROC                      glBindFramebufferEXT;
    static PFNGLDELETEFRAMEBUFFERSEXTPROC                   glDeleteFramebuffersEXT;
    static PFNGLGENFRAMEBUFFERSEXTPROC                      glGenFramebuffersEXT;
    static PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC               glCheckFramebufferStatusEXT;
    static PFNGLFRAMEBUFFERTEXTURE1DEXTPROC                 glFramebufferTexture1DEXT;
    static PFNGLFRAMEBUFFERTEXTURE2DEXTPROC                 glFramebufferTexture2DEXT;
    static PFNGLFRAMEBUFFERTEXTURE3DEXTPROC                 glFramebufferTexture3DEXT;
    static PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC              glFramebufferRenderbufferEXT;
    static PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC  glGetFramebufferAttachmentParameterivEXT;
    static PFNGLGENERATEMIPMAPEXTPROC                       glGenerateMipmapEXT;

    // GL_EXT_geometry_shader4
    #define GL_GEOMETRY_SHADER_EXT                          0x8DD9
    #define GL_GEOMETRY_VERTICES_OUT_EXT                    0x8DDA
    #define GL_GEOMETRY_INPUT_TYPE_EXT                      0x8DDB
    #define GL_GEOMETRY_OUTPUT_TYPE_EXT                     0x8DDC
    #define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT         0x8C29
    #define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT          0x8DDD
    #define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT            0x8DDE
    #define GL_MAX_VARYING_COMPONENTS_EXT                   0x8B4B
    #define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT          0x8DDF
    #define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT             0x8DE0
    #define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT     0x8DE1
    #define GL_LINES_ADJACENCY_EXT                          0xA
    #define GL_LINE_STRIP_ADJACENCY_EXT                     0xB
    #define GL_TRIANGLES_ADJACENCY_EXT                      0xC
    #define GL_TRIANGLE_STRIP_ADJACENCY_EXT                 0xD
    #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT     0x8DA8
    #define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT       0x8DA9
    #define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT           0x8DA7
    #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT     0x8CD4
    #define GL_PROGRAM_POINT_SIZE_EXT                       0x8642
    typedef void (APIENTRY * PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERTEXTUREEXT) (GLenum target, GLenum attachment, GLuint texture, GLint level);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERTEXTURELAYEREXT) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
    typedef void (APIENTRY * PFNGLFRAMEBUFFERTEXTUREFACEEXT) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face);
    static PFNGLPROGRAMPARAMETERIEXTPROC                    glProgramParameteriEXT;
    static PFNGLFRAMEBUFFERTEXTUREEXT                       glFramebufferTextureEXT;
    static PFNGLFRAMEBUFFERTEXTURELAYEREXT                  glFramebufferTextureLayerEXT;
    static PFNGLFRAMEBUFFERTEXTUREFACEEXT                   glFramebufferTextureFaceEXT;

    // GL_EXT_packed_depth_stencil
    #define GL_DEPTH_STENCIL_EXT                            0x84F9
    #define GL_UNSIGNED_INT_24_8_EXT                        0x84FA
    #define GL_DEPTH24_STENCIL8_EXT                         0x88F0
    #define GL_TEXTURE_STENCIL_SIZE_EXT                     0x88F1

    // GL_EXT_stencil_two_side
    #define GL_STENCIL_TEST_TWO_SIDE_EXT                    0x8910
    #define GL_ACTIVE_STENCIL_FACE_EXT                      0x8911
    typedef void (APIENTRY * PFNGLACTIVESTENCILFACEEXT) (GLenum face);
    static PFNGLACTIVESTENCILFACEEXT                        glActiveStencilFaceEXT;

    // GL_EXT_stencil_wrap
    #define GL_INCR_WRAP_EXT                                0x8507
    #define GL_DECR_WRAP_EXT                                0x8508

    // GL_EXT_texture3D, promoted to core in OpenGL 1.3
    #define GL_PACK_SKIP_IMAGES                             0x806B
    #define GL_PACK_IMAGE_HEIGHT                            0x806C
    #define GL_UNPACK_SKIP_IMAGES                           0x806D
    #define GL_UNPACK_IMAGE_HEIGHT                          0x806E
    #define GL_TEXTURE_3D                                   0x806F
    #define GL_PROXY_TEXTURE_3D                             0x8070
    #define GL_TEXTURE_DEPTH                                0x8071
    #define GL_TEXTURE_WRAP_R                               0x8072
    #define GL_MAX_3D_TEXTURE_SIZE                          0x8073
    typedef void (APIENTRY * PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
    typedef void (APIENTRY * PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
    static PFNGLTEXIMAGE3DPROC                              glTexImage3D;
    static PFNGLTEXSUBIMAGE3DPROC                           glTexSubImage3D;

    // GL_EXT_texture_compression_s3tc
    #define GL_COMPRESSED_RGB_S3TC_DXT1_EXT                 0x83F0
    #define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT                0x83F1
    #define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT                0x83F2
    #define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT                0x83F3

    // GL_EXT_texture_edge_clamp, promoted to core in OpenGL 1.2
    #define GL_CLAMP_TO_EDGE                                0x812F

    // GL_EXT_texture_filter_anisotropic
    #define GL_TEXTURE_MAX_ANISOTROPY_EXT                   0x84FE
    #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT               0x84FF

    // GL_EXT_timer_query
    typedef long long GLint64EXT;
    typedef unsigned long long GLuint64EXT;
    #define GL_TIME_ELAPSED_EXT                             0x88BF
    typedef void (APIENTRY * PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT *params);
    typedef void (APIENTRY * PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT *params);
    static PFNGLGETQUERYOBJECTI64VEXTPROC                   glGetQueryObjecti64vEXT;
    static PFNGLGETQUERYOBJECTUI64VEXTPROC                  glGetQueryObjectui64vEXT;

    // GL_NV_depth_clamp
    #define GL_DEPTH_CLAMP_NV                               0x864F

    // GL_NV_float_buffer
    // The WGL tokens and functions aren't defined
    #define GL_FLOAT_R_NV                                   0x8880
    #define GL_FLOAT_RG_NV                                  0x8881
    #define GL_FLOAT_RGB_NV                                 0x8882
    #define GL_FLOAT_RGBA_NV                                0x8883
    #define GL_FLOAT_R16_NV                                 0x8884
    #define GL_FLOAT_R32_NV                                 0x8885
    #define GL_FLOAT_RG16_NV                                0x8886
    #define GL_FLOAT_RG32_NV                                0x8887
    #define GL_FLOAT_RGB16_NV                               0x8888
    #define GL_FLOAT_RGB32_NV                               0x8889
    #define GL_FLOAT_RGBA16_NV                              0x888A
    #define GL_FLOAT_RGBA32_NV                              0x888B
    #define GL_TEXTURE_FLOAT_COMPONENTS_NV                  0x888C
    #define GL_FLOAT_CLEAR_COLOR_VALUE_NV                   0x888D
    #define GL_FLOAT_RGBA_MODE_NV                           0x888E

    // GL_NV_half_float
    // The function prototypes aren't defined
    #define GL_HALF_FLOAT_NV                                0x140B

    // GL_NV_shader_buffer_load
    #define GL_BUFFER_GPU_ADDRESS_NV                        0x8F1D
    #define GL_GPU_ADDRESS_NV                               0x8F34
    #define GL_MAX_SHADER_BUFFER_ADDRESS_NV                 0x8F35
    typedef GLvoid (APIENTRY * PFNGLMAKEBUFFERRESIDENTNVPROC) (GLenum target, GLenum access);
    typedef GLvoid (APIENTRY * PFNGLMAKEBUFFERNONRESIDENTNVPROC) (GLenum target);
    typedef GLboolean (APIENTRY * PFNGLISBUFFERRESIDENTNVPROC) (GLenum target);
    typedef GLvoid (APIENTRY * PFNGLMAKENAMEDBUFFERRESIDENTNVPROC) (GLuint buffer, GLenum access);
    typedef GLvoid (APIENTRY * PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC) (GLuint buffer);
    typedef GLboolean (APIENTRY * PFNGLISNAMEDBUFFERRESIDENTNVPROC) (GLuint buffer);
    typedef GLvoid (APIENTRY * PFNGLGETBUFFERPARAMETERUI64VNVPROC) (GLenum target, GLenum pname, GLuint64EXT *params);
    typedef GLvoid (APIENTRY * PFNGLGETNAMEDBUFFERPARAMETERUI64VNV) (GLuint buffer, GLenum pname, GLuint64EXT *params);
    typedef GLvoid (APIENTRY * PFNGLGETINTEGERUI64VNVPROC) (GLenum value, GLuint64EXT *result);
    typedef GLvoid (APIENTRY * PFNGLUNIFORMUI64NV) (GLint location, GLuint64EXT value);
    typedef GLvoid (APIENTRY * PFNGLUNIFORMUI64VNV) (GLint location, GLsizei count, GLuint64EXT *value);
    typedef GLvoid (APIENTRY * PFNGLGETUNIFORMUI64VNV) (GLuint program, GLint location, GLuint64EXT *params);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMUNIFORMUI64NV) (GLuint program, GLint location, GLuint64EXT value);
    typedef GLvoid (APIENTRY * PFNGLPROGRAMUNIFORMUI64VNV) (GLuint program, GLint location, GLsizei count, GLuint64EXT *value);
    static PFNGLMAKEBUFFERRESIDENTNVPROC                    glMakeBufferResidentNV;
    static PFNGLMAKEBUFFERNONRESIDENTNVPROC                 glMakeBufferNonResidentNV;
    static PFNGLISBUFFERRESIDENTNVPROC                      glIsBufferResidentNV;
    static PFNGLMAKENAMEDBUFFERRESIDENTNVPROC               glMakeNamedBufferResidentNV;
    static PFNGLMAKENAMEDBUFFERNONRESIDENTNVPROC            glMakeNamedBufferNonResidentNV;
    static PFNGLISNAMEDBUFFERRESIDENTNVPROC                 glIsNamedBufferResidentNV;
    static PFNGLGETBUFFERPARAMETERUI64VNVPROC               glGetBufferParameterui64vNV;
    static PFNGLGETNAMEDBUFFERPARAMETERUI64VNV              glGetNamedBufferParameterui64vNV;
    static PFNGLGETINTEGERUI64VNVPROC                       glGetIntegerui64vNV;
    static PFNGLUNIFORMUI64NV                               glUniformui64NV;
    static PFNGLUNIFORMUI64VNV                              glUniformui64vNV;
    static PFNGLGETUNIFORMUI64VNV                           glGetUniformui64vNV;
    static PFNGLPROGRAMUNIFORMUI64NV                        glProgramUniformui64NV;
    static PFNGLPROGRAMUNIFORMUI64VNV                       glProgramUniformui64vNV;

    // GL_NV_vertex_buffer_unified_memory
    #define GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV               0x8F1E
    #define GL_ELEMENT_ARRAY_UNIFIED_NV                     0x8F1F
    #define GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV               0x8F20
    #define GL_TEXTURE_COORD_ARRAY_ADDRESS_NV               0x8F25
    #define GL_VERTEX_ARRAY_ADDRESS_NV                      0x8F21
    #define GL_NORMAL_ARRAY_ADDRESS_NV                      0x8F22
    #define GL_COLOR_ARRAY_ADDRESS_NV                       0x8F23
    #define GL_INDEX_ARRAY_ADDRESS_NV                       0x8F24
    #define GL_EDGE_FLAG_ARRAY_ADDRESS_NV                   0x8F26
    #define GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV             0x8F27
    #define GL_FOG_COORD_ARRAY_ADDRESS_NV                   0x8F28
    #define GL_ELEMENT_ARRAY_ADDRESS_NV                     0x8F29
    #define GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV                0x8F2A
    #define GL_TEXTURE_COORD_ARRAY_LENGTH_NV                0x8F2F
    #define GL_VERTEX_ARRAY_LENGTH_NV                       0x8F2B
    #define GL_NORMAL_ARRAY_LENGTH_NV                       0x8F2C
    #define GL_COLOR_ARRAY_LENGTH_NV                        0x8F2D
    #define GL_INDEX_ARRAY_LENGTH_NV                        0x8F2E
    #define GL_EDGE_FLAG_ARRAY_LENGTH_NV                    0x8F30
    #define GL_SECONDARY_COLOR_ARRAY_LENGTH_NV              0x8F31
    #define GL_FOG_COORD_ARRAY_LENGTH_NV                    0x8float
    #define GL_ELEMENT_ARRAY_LENGTH_NV                      0x8F33
    typedef GLvoid (APIENTRY * PFNGLBUFFERADDRESSRANGENVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptrARB length);
    typedef GLvoid (APIENTRY * PFNGLVERTEXFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLNORMALFORMATNVPROC) (GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLINDEXFORMATNVPROC) (GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLTEXCOORDFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLEDGEFLAGFORMATNVPROC) (GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLSECONDARYCOLORFORMATNVPROC) (GLint size, GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLFOGCOORDFORMATNVPROC) (GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLVERTEXATTRIBFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLVERTEXATTRIBIFORMATNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride);
    typedef GLvoid (APIENTRY * PFNGLGETINTEGERUI64I_VNVPROC) (GLenum value, GLuint index, GLuint64EXT result[]);
    static PFNGLBUFFERADDRESSRANGENVPROC                    glBufferAddressRangeNV;
    static PFNGLVERTEXFORMATNVPROC                          glVertexFormatNV;
    static PFNGLNORMALFORMATNVPROC                          glNormalFormatNV;
    static PFNGLCOLORFORMATNVPROC                           glColorFormatNV;
    static PFNGLINDEXFORMATNVPROC                           glIndexFormatNV;
    static PFNGLTEXCOORDFORMATNVPROC                        glTexCoordFormatNV;
    static PFNGLEDGEFLAGFORMATNVPROC                        glEdgeFlagFormatNV;
    static PFNGLSECONDARYCOLORFORMATNVPROC                  glSecondaryColorFormatNV;
    static PFNGLFOGCOORDFORMATNVPROC                        glFogCoordFormatNV;
    static PFNGLVERTEXATTRIBFORMATNVPROC                    glVertexAttribFormatNV;
    static PFNGLVERTEXATTRIBIFORMATNVPROC                   glVertexAttribIFormatNV;
    static PFNGLGETINTEGERUI64I_VNVPROC                     glGetIntegerui64i_vNV;

#ifdef PROTEIN_PLATFORM_WINDOWS

    // WGL_ARB_extensions_string
    typedef const char*( APIENTRY* PFNWGLGETEXTENSIONSSTRINGARBPROC )( HDC hdc );
    static PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;

#endif


};

#endif //__OPENGLEXTENSIONS_H_INCLUDED__